package com.brainhealth.common.enums;

import java.util.ArrayList;
import java.util.List;

/**
 * @author wll
 * 文心一言入口枚举
 */
public enum ErnieBotEntranceEnum {
    ENTRANCE_1_BEFORE_EXERCISE(1,"训练前"),
    ENTRANCE_2_AFTER_EXERCISE(2,"训练后"),
    ENTRANCE_3_ASK_MOOD(3,"询问心情");

    private Integer code;
    private String desc;

    ErnieBotEntranceEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static boolean isValidateErnieBotCode(Integer ernieBotCode)
    {
        if (null==ernieBotCode){
            return false;
        }
        List<Integer> ernieBotCodeList = getErnieBotCodeList();
        return ernieBotCodeList.contains(ernieBotCode);
    }

   static List<Integer> getErnieBotCodeList()
    {
        List<Integer> ernieBotCodeList = new ArrayList<>();
        for (ErnieBotEntranceEnum ernieBotEntranceEnum : ErnieBotEntranceEnum.values()) {
            ernieBotCodeList.add(ernieBotEntranceEnum.code);
        }
        return ernieBotCodeList;
    }

}
